using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class PostoperativeCheckMap : EntityTypeConfiguration<PostoperativeCheck>
    {
        public PostoperativeCheckMap()
        {
            // Primary Key
            this.HasKey(t => t.checkID);

            // Properties
            this.Property(t => t.patient_id)
                .HasMaxLength(20);

            this.Property(t => t.create_by)
                .HasMaxLength(20);

            this.Property(t => t.update_by)
                .HasMaxLength(20);

            this.Property(t => t.degreeOfSTSegment)
                .HasMaxLength(20);

            this.Property(t => t.CTNIPeakValue)
                .HasMaxLength(20);

            this.Property(t => t.CKPeakValue)
                .HasMaxLength(20);

            this.Property(t => t.MMBPeakValue)
                .HasMaxLength(20);

            this.Property(t => t.CrPeakValue)
                .HasMaxLength(20);

            this.Property(t => t.PlateletFunctionTests)
                .HasMaxLength(10);

            this.Property(t => t.TEG)
                .HasMaxLength(800);

            this.Property(t => t.T_FFR)
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("PostoperativeCheck");
            this.Property(t => t.checkID).HasColumnName("checkID");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
            this.Property(t => t.create_time).HasColumnName("create_time");
            this.Property(t => t.create_by).HasColumnName("create_by");
            this.Property(t => t.update_time).HasColumnName("update_time");
            this.Property(t => t.update_by).HasColumnName("update_by");
            this.Property(t => t.degreeOfSTSegment).HasColumnName("degreeOfSTSegment");
            this.Property(t => t.CTNIPeakValue).HasColumnName("CTNIPeakValue");
            this.Property(t => t.CKPeakValue).HasColumnName("CKPeakValue");
            this.Property(t => t.MMBPeakValue).HasColumnName("MMBPeakValue");
            this.Property(t => t.CrPeakValue).HasColumnName("CrPeakValue");
            this.Property(t => t.PlateletFunctionTests).HasColumnName("PlateletFunctionTests");
            this.Property(t => t.TEG).HasColumnName("TEG");
            this.Property(t => t.T_FFR).HasColumnName("T_FFR");
        }
    }
}
